package com.dhl.cloud.common;

public class Constants {
	
	/**
	 * http请求中，存放平台token的键名
	 */
	public static final String HEADER_PLAT_TOKEN = "token";
	
	//分页
	public static final int PAGESIZE = 10;
	//sortnumber默认值
	public static final int SORTNUMBER = 10000;

	public static final String DEFAULT_TENEANTID = "1000000000000";
	public static final Integer BASETYPE=0;
	public static final Integer PUBLIC=2;
	//调用成功
	public static final int CODE_10000 = 200;
	//用户认证失败
	public static final int CODE_10001 = 10001;
	//权限验证失败
	public static final int CODE_10002 = 10002;
	//参数验证失败
	public static final int CODE_10003 = 10003;
	//业务验证失败
	public static final int CODE_10004 = 10004;
	//系统异常
	public static final int CODE_10005 = 10005;
	
	//加密、解密的盐值
	public static final String SALT = "dhl";

	/**
	 * redis常量
	 */
	//被访问用户集合
	public static final String USER_ACCESS_lIST = "useraccesslist:";
	//被访问数量
	public static final String USER_ACCESS_NUM = "useraccessnum:";
	//登录次数
	public static final String USER_LOGIN_NUM = "userloginnum:";
	//用户token
	public static final String USER_TOKEN = "token:";
	
	public static final String ERROR_MSG_1 = "验证码已失效";
	public static final String ERROR_MSG_2 = "验证码不正确";
	public static final String ERROR_MSG_3 = "账号不存在";
	public static final String ERROR_MSG_4 = "密码不正确";
	public static final String ERROR_MSG_5 = "账号已被锁定,请联系管理员";
	public static final String ERROR_MSG_6 = "登录名不能为空";
	public static final String ERROR_MSG_7 = "手机号不能为空";
	public static final String ERROR_MSG_8 = "证件号不能为空";
	public static final String ERROR_MSG_9 = "两次密码输入不一致";
	public static final String ERROR_MSG_10 = "帐号已经存在";
	public static final String ERROR_MSG_11 = "手机号已经存在";
	public static final String ERROR_MSG_12 = "证件号已经存在";
	public static final String ERROR_MSG_13 = "删除失败";
	public static final String ERROR_MSG_14 = "原来的密码不正确";
	public static final String ERROR_MSG_15 = "请选择一个文上传";
	public static final String ERROR_MSG_16 = "文件上传失败";
	public static final String ERROR_MSG_17 = "保存失败";
	public static final String ERROR_MSG_18 = "没有租户的帐号,请联系管理员";
	public static final String ERROR_MSG_19 = "租户没有变化";
	public static final String ERROR_MSG_20 = "实验已经收藏了";
	public static final String ERROR_MSG_21 = "注册失败";
	public static final String ERROR_MSG_22 = "服务器连接失败";
	public static final String ERROR_MSG_23 = "镜像已经存在";
	public static final String ERROR_MSG_24 = "重起失败";
	//通用的返回错误信息，没有实际意义
	public static final String ERROR_MSG_25 = "操作失败";
	public static final String ERROR_MSG_26 = "输入文字太多";
	public static final String ERROR_MSG_27 = "简述文字太多";
	public static final String ERROR_MSG_28 = "标签已经存在";
	public static final String ERROR_MSG_29 = "输入数值太大";
	public static final String ERROR_MSG_30 = "更新失败";
	public static final String ERROR_MSG_31 = "系统值已经存在了";
	public static final String ERROR_MSG_32 = "显示名称、系统取值不能为空";
	public static final String ERROR_MSG_33 = "显示名称已经存在了";
	public static final String ERROR_MSG_34 = "该账号未注册,需要注册";
	public static final String ERROR_MSG_35 = "已存在该实验名称！";
	public static final String ERROR_MSG_36 = "超过长度限制";
	public static final String ERROR_MSG_37 = "该账号已经被删除了！";
	public static final String ERROR_MSG_38 = "开始时间必须小于结束时间！";
//	public static final String ERROR_MSG_29 = "分值太大";
	public static final String ERROR_MSG_39 = "查询参数不对！";
	public static final String ERROR_MSG_40 = "该账号已过期！";
    public static final String ERROR_MSG_41 = "分类已经存在";
	public static final String ERROR_MSG_42 = "实验类型已经存在";
	public static final String ERROR_MSG_43 = "知识点已经存在";
	public static final String ERROR_MSG_44 = "课程名称太长";
	public static final String ERROR_MSG_45 = "没有临时课程内容";
	public static final String ERROR_MSG_46 = "文件大小超过限制，上传失败";
	public static final String ERROR_MSG_47 = "该实验室名称已存在";
	public static final String ERROR_MSG_48 = "个人存储空间不足";
	public static final String ERROR_MSG_49 = "行业名称已存在";
	public static final String ERROR_MSG_50 = "开始时间不能为空";
	public static final String ERROR_MSG_51 = "结束时间不能为空";
	public static final String ERROR_MSG_52 = "名称不能为空";
	
	/**********************token***********************/
	
  /**
  * redis-key-前缀-shiro:refresh_token
  */
 public final static String PREFIX_SHIRO_REFRESH_TOKEN = "story-admin:refresh_token:";

 /**
  * redis-key-前缀-shiro:refresh_check
  */
 public final static String PREFIX_SHIRO_REFRESH_CHECK = "story:refresh_check:";

 /**
  * JWT-currentTimeMillis
  */
 public final static String CURRENT_TIME_MILLIS = "currentTimeMillis";
	
 public static final String REQUEST_AUTH_HEADER="token";

 public static final String PAGE_NUM = "pagenum";


 public static final String PAGE_SIZE = "pagesize";
 
	/**
	 * 过期时间
	 */
	public static class ExpireTime {
		private ExpireTime() {
		}
		public static final int TEN_SEC =  10;//10s
		public static final int THIRTY_SEC =  30;//30s
		public static final int ONE_MINUTE =  60;//一分钟
		public static final int THIRTY_MINUTES =  60 * 30;//30分钟
		public static final int ONE_HOUR = 60 * 60;//一小时
		public static final int THREE_HOURS = 60 * 60 * 3;//三小时
		public static final int TWELVE_HOURS =  60 * 60 * 12;//十二小时，单位s
		public static final int ONE_DAY = 60 * 60 * 24;//二十四小时
	}
	
}
